redis 套件的 Property 'on' does not exist on type 'RedisClientType'


再用 typescript 開發時發現 client.on('error', (err) => console.log('Redis Client Error', err)); 會跳出錯誤 Property 'on' does not exist on type 'RedisClientType' ,加上 npm i -D @types/node 就解決了

#TypeScript #VS Code #Redis #nodejs #ts #js #Node






你可能感興趣的文章

CH5 IF, else 條件判斷入門

CH5 IF, else 條件判斷入門

[ Day 03 ] 用 Puppeteer 來做自動化機器人吧 (二) : 基礎篇

[ Day 03 ] 用 Puppeteer 來做自動化機器人吧 (二) : 基礎篇

財務分析(1) --  四大財報基本觀念

財務分析(1) -- 四大財報基本觀念






留言討論